export default {
    state:{
      user:{
        name:"张三",
        age:18,
        height:190
      }
    },
    getters:{
      fullName(state){
        return state.user.name+"111";
      },
      getStu2(state){
        return state.user.age+20;
      },
      fullName2(state,getters,rootState){
        return state.user.name+rootState.person.name;
      }
      
    },
    mutations:{
      changeName13(state,Payload){
        state.user.name=Payload;
      }
    },
    actions:{
      act2_changeName(context,Payload){
        console.log(context);
        setTimeout(()=>{
          context.commit("changeName13",Payload);
  
        },2000);
      }
    }
  }
